import { NgModule } from '@angular/core';
import { RouterModule } from '@angular/router';
import { FormsModule, ReactiveFormsModule } from '@angular/forms';
import { CommonModule } from '@angular/common';
import { systemRoutes } from './system.routes';
import { MdlModule } from '@angular-mdl/core';
import { SystemComponent } from './system.component';
import { CommonService } from '../common/service/common.service';
import { TableModule } from 'primeng/table';
import {
  TreeModule, TreeTableModule, BreadcrumbModule, ToolbarModule, InputTextModule, DialogModule, GalleriaModule,
  InputTextareaModule, PanelModule, ButtonModule, AutoCompleteModule, CalendarModule, ToggleButtonModule,
  CarouselModule, TabViewModule, PanelMenuModule, SharedModule, DataScrollerModule, EditorModule,
  ConfirmDialogModule, ConfirmationService, DropdownModule, DragDropModule, TooltipModule, RadioButtonModule,
  DataGridModule, GrowlModule, OrganizationChartModule, InputSwitchModule, CardModule, DataListModule, ListboxModule, MenubarModule
} from 'primeng/primeng';
import { OrderListModule } from 'primeng/orderlist';
import { FieldsetModule } from 'primeng/fieldset';
import { ToastModule } from 'primeng/toast';
import { FileUploadModule } from 'primeng/fileupload';
import { MultiSelectModule } from 'primeng/multiselect';
import { QkSharedModule } from '../common/module/qkshare.module';
import { ConfigComponent } from './config/config.component';
import { ConfigDetailComponent } from './config/config-detail.component';

import { UnitComponent } from './unit/unit.component';
import { UnitDetailComponent } from './unit/unit-detail.component';
import { DictComponent } from './dict/dict.component';
import { DictDetailComponent } from './dict/dict-detail.component';
import { UnitService } from './unit/service/unit.service';

import { SysinfoComponent } from './sysinfo/sysinfo.component';
import { SysinfoDetailComponent } from './sysinfo/sysinfo-detail.component';

import { ResourceComponent } from './resource/resource.component';
import { ResourceDetailComponent } from './resource/resource-detail.component';

import { RoleComponent } from './role/role.component';
import { RoleListComponent } from './role/role-list.component';
import { RoleInfoComponent } from './role/role-info.component';
import { RoleDetailComponent } from './role/role-detail.component';
import { RoleHumanComponent } from './role/role-human.component';
import { RoleResourcesComponent } from './role/role-resources.component';

import { HumanComponent } from './human/human.component';
import { HumanListComponent } from "./human/human-list.component";
import { HumanInfoComponent } from "./human/human-info.component";
import { HumanDetailComponent } from './human/human-detail.component';
import { HumanRoleComponent } from './human/human-role.component';
import { HumanService } from './human/service/human.service';

@NgModule({
  imports: [
    QkSharedModule,
    MenubarModule,
    FormsModule,
    ReactiveFormsModule,
    CommonModule,
    MdlModule,
    TreeModule,
    BreadcrumbModule,
    ToolbarModule,
    PanelModule,
    ButtonModule,
    AutoCompleteModule,
    InputTextModule,
    InputTextareaModule,
    TabViewModule,
    CarouselModule,
    PanelMenuModule,
    SharedModule,
    ConfirmDialogModule,
    DialogModule,
    CalendarModule,
    DropdownModule,
    DragDropModule,
    TooltipModule,
    GalleriaModule,
    DataScrollerModule,
    EditorModule,
    RadioButtonModule,
    DataGridModule,
    GrowlModule,
    TreeTableModule,
    InputSwitchModule,
    OrganizationChartModule,
    TableModule,
    CardModule,
    DataListModule,
    ListboxModule,
    ToggleButtonModule,
    MultiSelectModule,
    FileUploadModule,
    ToastModule,
    FieldsetModule,
    OrderListModule,
    RouterModule.forChild(systemRoutes)
  ],
  declarations: [
    SystemComponent,
    ConfigComponent,
    ConfigDetailComponent,
    UnitComponent,
    UnitDetailComponent,
    DictComponent,
    DictDetailComponent,
    HumanComponent,
    HumanListComponent,
    HumanInfoComponent,
    RoleComponent,
    ResourceComponent,
    SysinfoComponent,
    SysinfoDetailComponent,
    RoleInfoComponent,
    RoleDetailComponent,
    RoleListComponent,
    RoleHumanComponent,
    RoleResourcesComponent,
    HumanDetailComponent,
    HumanRoleComponent,
    ResourceDetailComponent,
  ],
  entryComponents: [
    ResourceDetailComponent,
    ConfigDetailComponent,
    DictDetailComponent
  ],
  exports: [
  ],
  providers: [
    CommonService,
    ConfirmationService,
    HumanService,
    UnitService
  ]
})
export class SystemModule { }
